<template>
  <div class="role-box">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="角色管理" name="first">
        <role-list v-if="activeName == 'first'" ref="roleList" @change="tabChange"></role-list>
      </el-tab-pane>
      <el-tab-pane label="项目权限" name="second">
        <permission-list v-if="activeName == 'second'"></permission-list>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import roleList from "@/components/RoleList/index.vue";
import permissionList from "@/components/PermissionList/index.vue";
export default {
  name: "",
  components: {
    roleList,
    permissionList,
  },
  data() {
    return {
      activeName: "first",
    };
  },
  mounted() {},
  methods: {
    handleClick() {},
    tabChange(obj) {
        this.activeName = obj;
    },
  },
};
</script>
<style lang="scss" scoped>
.role-box {
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #fff;
  box-sizing: border-box;
  ::v-deep .el-tabs {
    height: 100%;

    .el-tabs__content {
      overflow: unset;
      height: calc(100% - 75px);

      .el-tab-pane {
        height: 100%;
      }
    }
  }
}
</style>
